Ext.namespace("ca.magex.data");

ca.magex.data.TaggerStore = function(config) {
	
	var t = this;
	Ext.apply(this, config);

	var reader = new Ext.data.XmlReader({
		record: 'entity',
		id: '@id'
	}, config.fields);
	
	var failure = function(o) {
		alert("Failed: " + o);
	}
	
    ca.magex.data.TaggerStore.superclass.constructor.call(this, {
		url: 'php/tagger.php?action=query&type=' + config.type,
		autoLoad: true,
		reader: reader,
		failure: failure
    });

};

Ext.extend(ca.magex.data.TaggerStore, Ext.data.Store);
